import { BrowserRouter as Router, Route, Redirect } from 'react-router-dom'
import Login from '@/pages/Login'
import Layout from '@/pages/Layout'
import AuthRoute from '@/components/AuthRoute'

function App () {
  return (
    <Router>
      <div>
        <Route path='/' exact render={() => <Redirect to='/home' />} />
        <Route path='/login' component={Login} />
        <AuthRoute path='/home' component={Layout} />
      </div>
    </Router>
  )
}

export default App
